/**
 * @Project： Lqyd_Android
 * @Title：BookShelfPage
 * @Description：
 * @Author：wayne
 * @Date：2014年8月11日上午10:40:42
 */
package com.shwread.android.qysw.activity;

import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import com.shwread.android.ui.page.BookShelfPage;
import com.shwread.android.ui.page.BoutiquePage;
import com.tgx.tina.android.ipc.framework.IUIPage;


/**
 * @Project： Lqyd_Android
 * @Title：BookShelfPage
 * @Description：书架页面
 * @Author：wayne
 * @Date：2014年8月11日上午10:40:42
 */
public class BookShelfActivity
        extends
        MainActivity
{
	
	private Handler myhandler = new Handler()
	                          {
		                          
		                          @Override
		                          public void handleMessage(Message msg) {
			                          if (curPage != null) curPage.notifyView(msg.what, msg.getData());
			                          
		                          }
		                          
	                          };
	
	@Override
	public Handler getUIHandler() {
		return myhandler;
	}
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		changePage(new BookShelfPage(this), IUIPage.KEEP_LAST_STATUS);
	}
	
	@Override
	protected void onResume() {
		super.onResume();
	}
	
	@Override
	protected void onDestroy() {
		super.onDestroy();
	}
	
	@Override
	public void onBackPressed() {
		BoutiquePage.fromBoutique = false;
		if (curPage != null && curPage.handleBack()) { return; }
		if (history.isEmpty())
		{
			finish();
		}
		onBackPressed0();
	}
}
